package dl.demo.controller;

import org.springframework.http.ResponseEntity;

public class Result<T> {

    public static ResponseEntity status(int status){
        return ResponseEntity.status(status).body(null);
    }
    public static <T> ResponseEntity<T> data(T data){
        return ResponseEntity.ok(data);
    }
    public static <T> ResponseEntity<T> data(){
        return status(200);
    }
    public static <T> ResponseEntity<T> data(int status,T data){
        return ResponseEntity.status(status).body(data);
    }
}
